package com.ping.shiro;

/**
 * 认证结果
 * @author 浩子
 *2018年10月17日
 */
public class Result {

	//状态码
	 private Integer c;

	    private Data d;

	    //认证数据
	    public class Data{
	    	
	        private String e;
	        private String m;

	        public String getE() {
	            return e;
	        }

	        public void setE(String e) {
	            this.e = e;
	        }

	        public String getM() {
	            return m;
	        }

	        public void setM(String m) {
	            this.m = m;
	        }
	        
	    }

	    public Result(AuthorizationStatus status)
	    {
	        this.c = status.getCode();
	        Data data = new Data();
	        data.setM(status.getMsg());
	        data.setE(status.getException());
	        this.d = data;
	    }

	    public Result(Integer c, String d) {
	        this.c = c;
	        this.d.setM(d);
	    }

	    public Integer getC() {
	        return c;
	    }

	    public void setC(Integer c) {
	        this.c = c;
	    }

	    public Data getD() {
	        return d;
	    }

	    public void setD(Data d) {
		this.d = d;
	}
}
